<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/layouts/default.xhtml">
    <ui:define name="title">#{text['anneeScolaireList.title']}</ui:define>
    <ui:param name="menu" value="AdminMenu"/>
    <ui:param name="menuleft" value="AdminAnneeScolairesFormMenu"/>
    <ui:define name="bodyId">anneeScolaireList</ui:define>

    <ui:define name="body">
    	<c:set var="delObject" value="#{text['anneeScolaireList.anneeScolaire']}" />
		<script type="text/javascript">
			var msgDelConfirm = "<h:outputFormat value="#{text['delete.confirm']}"><f:param value="#{delObject}" /></h:outputFormat>";
	    </script>
        <div class="col-lg-12">
			<div class="page-header">
				<h3>#{text['anneeScolaireList.heading']}</h3>
			</div>
			<br/> <br/>
			
			 <h:form id="searchForm" styleClass="form-inline">
				  <div id="search" class="input-group text-right">
				    <h:inputText id="q" name="q" size="20" value="#{anneeScolaireList.query}" styleClass="form-control input-sm"/>
				    <span class="input-group-btn">
				      <h:commandButton value="#{text['button.search']}" styleClass="btn btn-default btn-sm" action="#{anneeScolaireList.search}"/>
				    </span>
				  </div>
            </h:form>

            <h:form id="editAnneeScolaire">

            <div id="actions" class="btn-group">
                <h:commandButton value="#{text['button.add']}" action="add" id="add" immediate="true" styleClass="btn btn-primary"/>
            </div>

            <p:dataTable id="anneeScolaires" var="anneeScolaire" value="#{anneeScolaireList.anneeScolaires}"
                         sortBy="#{anneeScolaireList.sortColumn}" paginator="true" rows="25"
                         paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15">
                
                <p:column>
                    <f:facet name="header">
                        <p:column sortBy="anneeScolaire">
                            <h:outputText value="#{text['anneeScolaire.anneeScolaire']}" />
                        </p:column>
                    </f:facet>
    				<h:outputText value="#{anneeScolaire.anneeScolaire}" escape="true"/>
                </p:column>
                
                <p:column>
                    <f:facet name="header">
                        <p:column sortBy="fraisInscription">
                            <h:outputText value="#{text['anneeScolaire.fraisInscription']}" />
                        </p:column>
                    </f:facet>
    				<h:outputText value="#{anneeScolaire.fraisInscription}" escape="true"/>
                </p:column>
                
                <p:column>
					<div class="text-center">
						<h:commandLink action="#{anneeScolaireForm.edit}"
							title="#{text['button.edit']}">
							<f:param name="id" value="#{anneeScolaire.id}"/>
                       		<f:param name="from" value="list"/>
							<span class="glyphicon glyphicon-pencil"></span>
						</h:commandLink>
					</div>
				</p:column>
				
				<p:column>
					<div class="text-center">
						<h:commandLink action="#{anneeScolaireForm.delete}" onclick="return confirmMessage(msgDelConfirm)"
							title="#{text['button.delete']}">
							<f:param name="id" value="#{anneeScolaire.id}"/>
							<span class="glyphicon glyphicon-trash"></span>
						</h:commandLink>
					</div>
				</p:column>
            </p:dataTable>
            </h:form>
        </div>
    </ui:define>
</ui:composition>
</html> 